package cn.broadsense.biz.service;

import cn.broadsense.biz.domain.TagRule;
import cn.broadsense.biz.dto.RuleTreeDto;
import cn.broadsense.biz.query.RuleQuery;
import cn.broadsense.biz.vo.TagRuleVo;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * @author bs
 * @description 针对表【t_tag_rule(标签规则)】的数据库操作Service
 * @createDate 2023-09-28 10:10:55
 */
public interface TagRuleService extends IService<TagRule> {


    /**
     * 添加规则
     *
     * @param ruleVo
     */
    void insertRule(TagRuleVo ruleVo);

    /**
     * 修改规则
     *
     * @param id
     * @param ruleVo
     */
    void editRule(Long id, TagRuleVo ruleVo);

    /**
     * 获取规则树列表
     * @param query
     * @return
     */
    List<RuleTreeDto> getRuleTree(RuleQuery query);

    /**
     * 获取规则树下拉选项
     * @return
     */
    List<RuleTreeDto> getRuleOption();

    /**
     * 根据ID获取子规则
     * @param id
     * @return
     */
    Long getChildrenList(Long id);

}
